package com.tobeface.wechat.core;

/**
 * @author loudyn
 */
public final class WeChatSettings {

    private final String appKey;
    private final String appSecret;
    private final String appUrl;
    private final String appToken;

    WeChatSettings(Builder builder) {
        this.appKey = builder.appKey;
        this.appSecret = builder.appSecret;
        this.appUrl = builder.appUrl;
        this.appToken = builder.appToken;
    }

    public String getAppKey() {
        return appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public String getAppUrl() {
        return appUrl;
    }

    public String getAppToken() {
        return appToken;
    }

    /**
     * @return
     */
    public static Builder newBuilder() {
        return new Builder();
    }

    /**
     *
     */
    public static class Builder {
        private String appKey;
        private String appSecret;
        private String appUrl;
        private String appToken;

        Builder() {
        }

        public Builder appKey(String appKey) {
            this.appKey = appKey;
            return this;
        }

        public Builder appSecret(String appSecret) {
            this.appSecret = appSecret;
            return this;
        }

        public Builder appUrl(String appUrl) {
            this.appUrl = appUrl;
            return this;
        }

        public Builder appToken(String appToken) {
            this.appToken = appToken;
            return this;
        }

        public WeChatSettings build() {
            return new WeChatSettings(this);
        }
    }
}
